import React, {lazy, Suspense} from "react";
import Loading from "@/components/Loading";
export type TMy = {
    age:number
}
export const lazyLoading = (comPath:string) => {
    const Com = lazy(()=>import("@/pages/"+comPath))
    return (
        <Suspense fallback={<Loading/>}>
            <Com/>
        </Suspense>
    )
}